package com.webchat.connect.messagequeue.consumer.rocketmq;

import com.webchat.connect.messagequeue.consumer.service.GroupVideoCallConsumeService;
import com.webchat.connect.messagequeue.consumer.service.WebRtcSDPConsumeService;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
//@RocketMQMessageListener(consumerGroup = "web_chat", topic = "queue_group_video_call", messageModel = MessageModel.BROADCASTING)
public class GroupVideoRocketQueueConsumer implements RocketMQListener<String> {

        @Autowired
        private GroupVideoCallConsumeService groupVideoCallConsumeService;

        /**
         * 处理来自IM 对话相关消息
         *
         * @param message
         */
        @Override
        public void onMessage(String message) {

             groupVideoCallConsumeService.consume(message);
        }
}